<template>
    <el-card shadow="hover" :body-style="{ padding: '0px' }">
        <div style="overflow-x: auto;margin-bottom: 15px;margin-left: 15px;margin-right: 15px">
        <div style="display: table;min-width: 2000px; padding: 20px 0px 15px;">
            <div style="display: table-row">
                <div class="tableTitle" style="width: 2.5rem">
                    序号
                </div>
                <div class="tableTitle">
                    检索类别
                </div>
                <div class="tableTitle">
                    作者
                </div>
                <div class="tableTitle">
                    题目
                </div>
                <div class="tableTitle">
                    刊名
                </div>
                <div class="tableTitle">
                    出版年
                </div>
                <div class="tableTitle">
                    issn
                </div>
                <div class="tableTitle">
                    最终分区
                </div>
                <div class="tableTitle">
                    最终影响因子
                </div>
                <div class="tableTitle">
                    重复说明
                </div>
                <div class="tableTitle">
                    第一作者身份
                </div>
                <div class="tableTitle">
                    第一作者姓名
                </div>
                <div class="tableTitle">
                    导师职称
                </div>
                <div class="tableTitle">
                    导师姓名
                </div>
                <div class="tableTitle">
                    通讯作者身份
                </div>
                <div class="tableTitle">
                    通讯作者姓名
                </div>
                <div class="tableTitle">
                    领款人
                </div>
            </div>
            <div :class="{'tablerow':true, 'grayLine': (index % 2 === 0)}" style="display: table-row;" v-if="paperList.length > 0" v-for="(item,index) in paperList" :key="item.id">
                <div class="tableTitle">
                    {{index + 1}}
                </div>
                <div class="tableTitle">
                    {{item.sort}}
                </div>
                <div class="tableTitle">
                    {{item.author}}
                </div>
                <div class="tableTitle">
                    {{item.timu}}
                </div>
                <div class="tableTitle">
                    {{item.kanming}}
                </div>
                <div class="tableTitle">
                    {{item.chubannian}}
                </div>
                <div class="tableTitle">
                    {{item.issn}}
                </div>
                <div class="tableTitle">
                    {{item.fenqu}}
                </div>
                <div class="tableTitle">
                    {{item.yinzi}}
                </div>
                <div class="tableTitle">
                    {{item.chongfushuoming}}
                </div>
                <div class="tableTitle">
                    {{item.diyizuozheShenfen.name}}
                </div>
                <div class="tableTitle">
                    {{item.diyizuozhe.name}}
                </div>
                <div class="tableTitle">
                    {{item.daoshiShenfen.name}}
                </div>
                <div class="tableTitle">
                    {{item.daoshi.name}}
                </div>
                <div class="tableTitle">
                    {{item.tongxunzuozheShenfen.name}}
                </div>
                <div class="tableTitle">
                    {{item.tongxunzuozhe.name}}
                </div>
                <div class="tableTitle">
                    {{item.lingkuanren}}
                </div>
            </div>
        </div>
        </div>
        <div style="float:right;padding-right: 15px;margin-bottom: 15px">
            <el-button type="primary" size="mini" @click="getMessage">导出</el-button>
        </div>
    </el-card>
</template>

<script>
    import Cookies from 'js-cookie'
    import API from '../../api'
    import PRO from '../../api/API_PRO'
    export default {
        name: "personal_paperList",

        data(){
            return{
                paperList:[],
                currentPage:1,
                size:30,
                token: Cookies.get('token'),
                type:Cookies.get('type'),
                condition:[],
            }
        },
        mounted:function() {
            this.getPaperList();
        },

        methods:{
            getPaperList(){
                let data ={
                    token: this.token,
                    page:this.page,
                    size:this.size,
                    condition:this.condition, //????
                };
                API.personalPaperList(data).then(res => {
                    if(res.code){
                        alert(res.message);
                        return;
                    }
                    this.paperList = res.list;
                    this.total = res.count;
                    return res
                }).catch(msg => {
                    alert(msg)
                })
            },
            getMessage(){
                window.open(PRO.baseURL+"renling/renling/export?token="+this.token)

            },
        }
    }
</script>

<style scoped>
    .tableTitle{
        display: table-cell;
        font-size: 15px;
        padding: 5px;
        color:gray;
        text-align: center;
    }
    .tableCell{
        display: table-cell;
        font-size: 15px;
        padding: 5px;
        text-align: center;
    }
    .grayLine{
        background-color: #e4efff;
    }
</style>